﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using WickedSick.ClientComponents.Music;

namespace SDB
{
    /// <summary>
    /// Interaction logic for PlaylistDisplay.xaml
    /// </summary>
    public partial class PlaylistDisplay : Window
    {
        MediaBI mbi;
        public PlaylistDisplay()
        {
            InitializeComponent();
            mbi = new MediaBI("MediaBank.sdb");
            mbi.CommunicationComplete += new CommunicationCompleteDelegate(mbi_CommunicationComplete);
            mbi.InitializeMedia(1);
        }

        void mbi_CommunicationComplete(object sender, int CommunicationType)
        {
            if (CommunicationType == 1)
            {
                mbi.InitializePlaylists(1);
            }
            if (CommunicationType == 3)
            {
                lstPlaylists.ItemsSource = mbi.Bank.Playlists.Values;
            }
        }
    }
}
